<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

namespace Database\Seeders;

use App\Models\AssessTemplate;
use App\Models\AssessTemplateRule;
use App\Models\UserAssessLog;
use App\Models\UserProfile;
use Illuminate\Database\Seeder;

class AssessTemplateSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run()
    {
        for ($i = 0; $i < 10; ++$i) {
            /** @var AssessTemplate $assessTemp */
            $assessTemp = AssessTemplate::factory()->create();
            $user = UserProfile::factory()->create();
            for ($j = 0; $j < 4; ++$j) {
                /** @var AssessTemplateRule $rule */
                $rule = AssessTemplateRule::factory()->create([
                    'assess_template_id' => $assessTemp->id,
                ]);
                continue;
                UserAssessLog::factory()->create([
                    'assess_template_id' => $assessTemp->id,
                    'assess_template_rule_id' => $rule->id,
                    'user_profile_id' => $user->id,
                ]);
            }
        }
    }
}
